<?php
require_once './admin-header.php';
require_once './core/admin-sql.php';
$sql = new AdminSql();
?>
    <!DOCTYPE html>
    <html lang="zh-CN">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="initial-scale=1.0,width=device-width,user-scalable=0,maximum-scale=1.0"/>
        <title>设置</title>
        <link rel="stylesheet" href="../css/base.css">
        <link rel="stylesheet" href="../css/index.css">
        <link rel="stylesheet" href="./css/jquery.xctips.css"/>

        <script>
            function adapte() {//适配
                var designWidth = 1080, rem2px = 100;
                document.documentElement.style.fontSize = window.innerWidth / designWidth * rem2px + "px";
            }
            adapte();
        </script>
        <style>
        </style>
    </head>
    <body>
    <div class="set set2 fs36">
        <ul class="list">
            <?php
            list($static, $re_array) = $sql->searchSets($_SESSION['uid']);
            if ($static != 0) exit($re_array);
            $re_array_2 = $re_array[2];
            $num = count($re_array_2);
            $listName = array_keys($re_array_2);
            for ($i = 0; $i < $num; $i++) {
                ?>
                <li>
                    <ul class="list1 flex2">
                        <li class="list-name"><?= $listName[$i] ?></li>
                        <li><input type="text" value="<?= $re_array_2[$listName[$i]] ?>" onchange="updateUserSets(2)">
                        </li>
                    </ul>
                </li>
                <?php
            }
            ?>
        </ul>
    </div>
    <script src='../script/jquery.js'></script>
    <script src='../script/index.js'></script>
    </body>
    </html>
<?php
require_once './admin-footer.php';